import { Col, Row } from "antd";
import {loginInfoAPI} from "@/api/api";
import { useEffect, useState } from "react";
import UserInfo from "./component/UserInfo";
import UserForm from "./component/UserForm";
const Home = () => {
    const [data, setData] = useState([]);
    useEffect(() => {
        getList()
    }, []);
    const getList = () => {
        loginInfoAPI().then(res => {
            setData(res.data)
            console.log(res)
        })
    }
    return (
        <div  >
             <Row>
                <Col span={12}>
                    <UserInfo data={data}  />
                </Col>
                <Col span={12}> 
                 <UserForm  data={data}/>
                </Col>
             </Row>
        </div>
    );
}
export default Home;